package com.alan.api.share.common.enums;

import lombok.Getter;

/**
 * Created by Alan on 2017/10/27.
 */
public enum ResponseCodeEnum {

    SUCCESS("200", "成功"),
    FAIL("10000", "失败"),

    REPEAT_REQUEST_ERROR("10001", "重复请求"),
    INPUT_MUST_NOT_NULL("10002", "参数不可为空"),
    REQUEST_VERIFY_FAIL("10003", "请求验签失败"),
    DATA_EXPIRED("10004", "更新数据已过期"),
    UN_KNOWN("10005", "未知错误"),
    MAXIMUM_LIMIT("10006", "超过最大查询记录限制"),
    ENUM_NOT_EXIST("10007", "无匹配的数据字典定义"),
    TOKEN_NOT_EXIST("10008", "token不存在"),
    TOKEN_IS_INVALID("10009", "token已失效"),
    AUTHCODE_IS_INVALID("10010", "验证码已失效"),
    AUTHCODE_ERROR("10011", "验证码不正确"),
    AUTHCODE_TYPE_ERROR("10012", "验证码类型错误"),
    INPUT_MUST_ERROR("10013", "参数格式错误"),
    INPUT_VALID_ERROR("10014", "参数错误"),

    ORDER_NOT_EXIST("20001", "订单不存在"),
    ORDER_DUPLICATE("20002", "订单重复"),
    ORDER_STATUS_NOT_ALLOW_REFUND("20003", "订单状态不可退款"),
    ORDER_BALANCE_NOT_ENOUGH("20004", "订单余额不足"),
    ORDER_REFUND_FAIL("20005", "订单退款失败"),
    ORDER_AMT_ERROR("20006", "订单金额错误"),
    ORDER_URL_ERROR("20007", "Url格式错误"),
    ORDER_STATUS_PAYED("20008", "订单已支付过"),
    ORDER_TIME_EXPIRED("20009", "订单已过期"),

    UPLOAD_FILE_RESULT_ERROR("80001", "上传文件返回结果错误"),
    UPLOAD_FILE_OVER_MAXSIZE("80002", "上传文件超过最大限制"),

    CHNL_NOT_EXIST("30001", "支付渠道不存在或未配置"),

    BROWSER_NOT_SUPPORT("40001", "请不要在微信内置浏览器打开"),
    WX_OUT_TRADE_NO_USED("40002", "微信订单号重复."),
    WX_INVALID_REQUEST("40003", "微信订单号重复,该笔交易已经在其他终端使用微信创建，请继续在原来终端支付或者换一种支付方式."),
    WX_ACCOUNT_NOT_MATCH("40004", "请求报文和响应报文中的appid和mch_id不一致."),
    WX_COMM_ERROR("40005", "微信错误:"),
    //金融绑卡
    ZAFINANCE_PAY_ERROR("41000", "金融绑卡交易失败！"),
    ZAFINANCE_REFUND_ERROR("41001", "金融绑卡退款失败！"),

    DATE_FORMAT_ERROR("40010","时间格式不正确"),

    MERCHANT_ACCOUNT_NOT_FOUND("50002", "用户名不存在"),
    EMIAL_AND_PHONE_NOT_NULL("50003", "邮箱和手机号不能同时为空"),
    EMIAL_NOT_NULL("50004", "邮箱不存在"),
    PHONE_NOT_NULL("50005", "手机号不存在"),
    LOGIN_ERROR_NUM_INVALID("50006", "账号已被锁定，请半小时后尝试"),

    TRANSFER_SYSTEM_BUSY("40400","支付渠道系统繁忙，请稍后用同一商户单号再次调用。只会发送一笔转账。");


    @Getter
    private String code;
    @Getter
    private String msg;

    ResponseCodeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
